﻿using System;
using System.Threading;
using test.XcoAppSpaces.Transport.Jabber;
using XcoAppSpaces.Contracts.Transport;
using Message=agsXMPP.protocol.client.Message;

namespace test.XcoAppSpaces.Transport.Jabber
{
    class ReceivedTmp
    {
        public AutoResetEvent are { get; set; }
        public Message msgReceived { get; set; }

        
        private MessageSerializer serializer = new MessageSerializer();
 
        public void MessageReceived(XcoMessage msg, string remoteAddress, IXcoTransportService commService)
        {
            msgReceived = (Message)serializer.Deserialize(msg.Content);
            are.Set();
        }
    }
}
